import request from '@/utils/request'

// 查询停运车辆列表
export function outageList(query) {
  return request({
    url: '/safety/position/outageList',
    method: 'get',
    params: query
  })
}
// 查询离线车辆列表
export function offlineList(query) {
  return request({
    url: '/safety/position/offlineList',
    method: 'get',
    params: query
  })
}
// 查询实时位置列表
export function listPosition(query) {
  return request({
    url: '/safety/position/list',
    method: 'post',
    data: query
  })
}

// 查询实时位置详细
export function getPosition(deviceId) {
  return request({
    url: '/safety/position/' + deviceId,
    method: 'get'
  })
}

// 新增实时位置
export function addPosition(data) {
  return request({
    url: '/safety/position',
    method: 'post',
    data: data
  })
}

// 修改实时位置
export function updatePosition(data) {
  return request({
    url: '/safety/position',
    method: 'put',
    data: data
  })
}

// 删除实时位置
export function delPosition(deviceId) {
  return request({
    url: '/safety/position/' + deviceId,
    method: 'delete'
  })
}

